package com.hmy.infrastructure.service.signature.impl;

import com.hmy.infrastructure.api.bo.request.signature.GetUploadUrlApiRequest;
import com.hmy.infrastructure.api.bo.response.signature.GetUploadUrlApiResponse;
import com.hmy.infrastructure.bo.request.signature.*;
import com.hmy.infrastructure.bo.response.signature.*;
import com.hmy.infrastructure.service.signature.ISignatureService;
import com.hmy.infrastructure.service.signature.SignatureBaseService;
import org.springframework.stereotype.Service;

/**
 * @Description 电子签名服务接口，提供给Controller或者Feign调用
 * @Author seven.qi
 * @Date 2023/11/24 10:18
 * @Version 1.0
 */
@Service
public class SignatureService extends SignatureBaseService implements ISignatureService {
    @Override
    public GetUploadUrlApiResponse getUploadFileUrl(GetUploadUrlApiRequest getUploadUrlRequest) throws Exception {
        return getSignatureService(getUploadUrlRequest).getUploadFileUrl(getUploadUrlRequest);
    }

    @Override
    public CreateSignatureProcessResponse create(CreateSignatureProcessRequest createSignatureProcessRequest) {
        return getSignatureService(createSignatureProcessRequest).create(createSignatureProcessRequest);
    }

    @Override
    public CreateContractResponse createContract(CreateContractRequest createContractRequest) {
        return getSignatureService(createContractRequest).createContract(createContractRequest);
    }

    @Override
    public CreateContractByFileResponse createContractByFile(CreateContractByFileRequest createContractRequest) {
        return getSignatureService(createContractRequest).createContractByFile(createContractRequest);
    }

    @Override
    public SignTemplateFieldFillResponse signTemplateFieldFill(SignTemplateFieldFillRequest fieldFillRequest) {
        return getSignatureService(fieldFillRequest).signTemplateFieldFill(fieldFillRequest);
    }

    @Override
    public FileTemplateFieldFillResponse fileTemplateFieldFill(FileTemplateFieldFillRequest fileTemplateFieldFillRequest) {
        return getSignatureService(fileTemplateFieldFillRequest).fileTemplateFieldFill(fileTemplateFieldFillRequest);
    }

    @Override
    public StartSignatureProcessResponse start(StartSignatureProcessRequest startSignatureProcessRequest) {
        return getSignatureService(startSignatureProcessRequest).start(startSignatureProcessRequest);
    }

    @Override
    public GetSignFileUrlResponse getSignFileUrl(GetSignFileUrlRequest getSignFileUrlRequest) {
        return getSignatureService(getSignFileUrlRequest).getSignFileUrl(getSignFileUrlRequest);
    }

    @Override
    public GetSignTaskUrlResponse getSignTaskUrl(GetSignTaskUrlRequest getSignTaskUrlRequest) {
        return getSignatureService(getSignTaskUrlRequest).getSignTaskUrl(getSignTaskUrlRequest);
    }

    @Override
    public SignTaskCancelResponse signTaskCancel(SignTaskCancelRequest request) {
        return getSignatureService(request).signTaskCancel(request);
    }


}
